package DB.dao;

import DB.dto.*;
import DB.exceptions.*;

public interface OperationDao
{
	/** 
	 * Inserts a new row in the OPERATION table.
	 */
	public int insert(OperationDto dto) throws OperationDaoException;

	/** 
	 * Updates a single row in the OPERATION table.
	 */
	public void update(int pk, OperationDto dto) throws OperationDaoException;

	/** 
	 * Deletes a single row in the OPERATION table.
	 */
	public void delete(int pk) throws OperationDaoException;

	/** 
	 * Returns the rows from the OPERATION table that matches the specified primary-key value.
	 */
	public OperationDto findByPrimaryKey(int pk) throws OperationDaoException;

	/** 
	 * Returns all rows from the OPERATION table that match the criteria 'ID_OPERATION = :idOperation'.
	 */

	public OperationDto[] findAll() throws OperationDaoException;

    public OperationDto[] findByNurse(int idNurse) throws OperationDaoException;

	/** 
	 * Returns all rows from the OPERATION table that match the criteria 'ID_PRESCRIPTION = :idPrescription'.
	 */
	public OperationDto[] findByPrescription(int idPrescription) throws OperationDaoException;

	/** 
	 * Returns all rows from the OPERATION table that match the criteria 'CABINETNUMBER = :cabinetnumber'.
	 */
	public OperationDto[] findByProcedurecabinet(int cabinetnumber) throws OperationDaoException;

	/** 
	 * Returns all rows from the OPERATION table that match the criteria 'ID_OPERATION = :idOperation'.
	 */
	public OperationDto[] findWhereIdOperationEquals(int idOperation) throws OperationDaoException;

	/** 
	 * Returns all rows from the OPERATION table that match the criteria 'NAME = :name'.
	 */
	public OperationDto[] findWhereNameEquals(String name) throws OperationDaoException;

	/** 
	 * Returns all rows from the OPERATION table that match the criteria 'ID_PRESCRIPTION = :idPrescription'.
	 */
	public OperationDto[] findWhereIdPrescriptionEquals(int idPrescription) throws OperationDaoException;

	/** 
	 * Returns all rows from the OPERATION table that match the criteria 'DATEOFOPERATION = :dateofoperation'.
	 */
	public OperationDto[] findWhereDateofoperationEquals(long dateofoperation) throws OperationDaoException;

	/** 
	 * Returns all rows from the OPERATION table that match the criteria 'CABINETNUMBER = :cabinetnumber'.
	 */
	public OperationDto[] findWhereCabinetnumberEquals(int cabinetnumber) throws OperationDaoException;

	/** 
	 * Sets the value of maxRows
	 */
	public void setMaxRows(int maxRows);

	/** 
	 * Gets the value of maxRows
	 */
	public int getMaxRows();

	/** 
	 * Returns all rows from the OPERATION table that match the specified arbitrary SQL statement
	 */
	public OperationDto[] findByDynamicSelect(String sql, Object[] sqlParams) throws OperationDaoException;

	/** 
	 * Returns all rows from the OPERATION table that match the specified arbitrary SQL statement
	 */
	public OperationDto[] findByDynamicWhere(String sql, Object[] sqlParams) throws OperationDaoException;

}
